package pl.edu.agh.gronoMining.frequentSubgraphFinder.graph;

import java.util.Comparator;

/**
 * represents edge in graph
 */
public interface Edge {

	/**
	 * @return label of edge
	 */
	int getLabel();
	
	/**
	 * @param node
	 * @return other node of this edge nodes than node given as argument
	 */
	public Node getOtherNode(Node node);
	
	/**
	 * @return one of nodes of this edge
	 */
	public Node getNodeA();
	
	/**
	 * @return one of nodes of this edge, other that one returned by getNodeA(); 
	 */
	public Node getNodeB();
	
	/**
	 * Make sure that all edge nodes has this edge in their 'edges' set.
	 */
	public void checkIntegraty() throws GraphException;
	
	/**
	 * sort nodes of this edge using comparator given as argument
	 * @param c comparator used in sorting process
	 */
	public void sortNodes(Comparator<Node> c);
	
}
